<template>
	<view class="see-sign-in-container">
		<view class="list" v-for="item in list" :key="item._id">
			<view class="left">
				<view class="avatar">
					<image :src="item.user.avatar?item.user.avatar:'/static/logo.png'" mode=""></image>
				</view>
				<view class="name">
					{{item.user.name}}
				</view>
			</view>
			<view class="right">
				<view class="top">
					{{item.workingHours? "签退" : "签到"}}
				</view>
				<view class="bottom" v-if="item.workingHours">
					工作时长为:{{(item.workingHours / (1000*60*60*24)).toFixed(3)}}小时
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {clockRecords} from "../../../ajax/api/clock.js";
	export default {
		data() {
			return {
				list:[]
			}
		},
		async onShow(){
			const id = this.$Route.query.id
			const res = await clockRecords({
				recruitmentInfo:id,
			})
			this.list = res.rows;
			console.log(res);
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
@import "./css/seeSignIn.scss";
</style>
